<?php
class Visi_View_Helper_GetDescription extends Zend_View_Helper_Abstract {

    public function getDescription($str, $num = null, $after = null) {
    
        if (is_null($num)) $num = 100;
        if (is_null($after)) $after = '...';
        $str = str_replace("\n", ' ', $str);
        $str = str_replace("\r", ' ', $str);
        return $this->view->truncateWords($str, $num, $after);
    
    }

}